package com.hqyj.mapper;

import com.hqyj.pojo.SelectAll;
import com.hqyj.pojo.User;
import com.hqyj.pojo.UserVO;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface UserMapper {
    Integer insertOne(@Param("uAccount") String uAccount , @Param("uPassword")String uPassword , @Param("uPhone")String uPhone );

    User selectOneByAccount(@Param("uAccount") String uAccount);

    User selectOneByAccountAndPassword(@Param("uAccount")String uAccount ,@Param("uPassword")String uPassword);

    Integer updateLastLoginTime(@Param("lastLoginTime") Date date ,@Param("uId") int uId);

    /*goods需要用到*/
    List<User> findUserName(String uName);
    User findUserIdByName(String uAccount);
    Integer updateGoodsContactByuId(@Param("uId")int uId);
    int findGoodsContactByUidCount(@Param("uId")int uId);
    //分页
    List<SelectAll> selectAll(@Param("uName") String uName, @Param("departmentName") String departmentName);

    //信息回显
    UserVO update(int id);

    //修改用户信息
    int updateUser(User user);

    //删除用户信息
    int deleteUser(int id);


    UserVO selectUserVOByAccount(@Param("uAccount") String uAccount);
}
